-- GENERATED SPELL FOR [Goliathon] --


function spell0_19305(pUnit, Event) --@Crystal Strike,n/a--
pUnit:FullCastSpellOnTarget(33688,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19305', 615, 1)
end

function spell1_19305(pUnit, Event) --@Knock Away,n/a--
pUnit:FullCastSpellOnTarget(32959,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19305', 505, 1)
end

function spell2_19305(pUnit, Event) --@Summon Goliathon Shardling,Self--
pUnit:FullCastSpellOnTarget(33904,pUnit)
pUnit:RegisterEvent('Sorts_19305', 609, 1)
end

function spell3_19305(pUnit, Event) --@Summon Goliathon Shardling,Self--
pUnit:FullCastSpellOnTarget(33905,pUnit)
pUnit:RegisterEvent('Sorts_19305', 653, 1)
end

function spell4_19305(pUnit, Event) --@Summon Goliathon Shardling,Self--
pUnit:FullCastSpellOnTarget(33906,pUnit)
pUnit:RegisterEvent('Sorts_19305', 619, 1)
end

function spell5_19305(pUnit, Event) --@Summoned Demon,Self--
pUnit:FullCastSpellOnTarget(7741,pUnit)
pUnit:RegisterEvent('Sorts_19305', 604, 1)
end

function spell6_19305(pUnit, Event) --@Trample,Self--
pUnit:FullCastSpellOnTarget(5568,pUnit)
pUnit:RegisterEvent('Sorts_19305', 600, 1)
end

function Sorts_19305(pUnit, Event)
local choix_sorts_19305 = math.random(0, 6)
if choix_sorts_19305 == 0 then
pUnit:RegisterEvent('spell0_19305', 1, 1)
end
if choix_sorts_19305 == 1 then
pUnit:RegisterEvent('spell1_19305', 1, 1)
end
if choix_sorts_19305 == 2 then
pUnit:RegisterEvent('spell2_19305', 1, 1)
end
if choix_sorts_19305 == 3 then
pUnit:RegisterEvent('spell3_19305', 1, 1)
end
if choix_sorts_19305 == 4 then
pUnit:RegisterEvent('spell4_19305', 1, 1)
end
if choix_sorts_19305 == 5 then
pUnit:RegisterEvent('spell5_19305', 1, 1)
end
if choix_sorts_19305 == 6 then
pUnit:RegisterEvent('spell6_19305', 1, 1)
end
end

function mob19305_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19305', math.random(1500, 3000), 1)
end

function mob19305_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19305_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19305_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19305, 1, 'mob19305_Action')
RegisterUnitEvent(19305, 2, 'mob19305_Leave')
RegisterUnitEvent(19305, 3, 'mob19305_Kill')
RegisterUnitEvent(19305, 4, 'mob19305_Die')
